<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="csrf-token" content="{{ csrf_token() }}" />
    <title>{{config('site.sitename')}} | 注册</title>

    <link href="/assets/css/bootstrap.min.css" rel="stylesheet">
    <link href="/assets/font-awesome/css/font-awesome.css" rel="stylesheet">
    <link href="/assets/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/assets/css/animate.css" rel="stylesheet">
    <link href="/assets/css/style.min.css" rel="stylesheet">

</head>

<body class="gray-bg">

    <div class="middle-box text-center loginscreen   animated fadeInDown">
        <div>
            <div>

                <h1 class="logo-name" style="font-size:50px;letter-spacing:4px;">{{config('site.sitename')}}</h1>

            </div>
            <h3>Welcome to {{config('site.sitename')}}</h3>
            <p>注册</p>
            <form id="form" class="m-t" role="form" method="post" action="/auth/register">
            {!! csrf_field() !!}
                <div class="form-group">
                    <input type="text" class="form-control" placeholder="用户名" name="username" required="">
                </div>
                <div class="form-group">
                    <input type="text" class="form-control" placeholder="姓名" name="fullname" required="">
                </div>
                <div class="form-group">
                    <input type="email" class="form-control" placeholder="Email" name="email" required="">
                </div>
                <div class="form-group">
                    <input type="text" class="form-control" placeholder="手机" name="phone" required="">
                </div>
                <div class="form-group">
                    <input type="password" class="form-control" placeholder="密码" name="password" required="">
                </div>
                <div class="form-group">
                    <div class="radio">
                        <label><input type="radio" name="gender" value="1" checked="checked">男</label>
                        <label><input type="radio" name="gender" value="0">女</label>
                    </div>
                </div>
                <div class="form-group">
                        <div class="checkbox i-checks"><label> <input type="checkbox"><i></i> 同意条款以及协议 </label></div>
                </div>
                <button type="submit" class="btn btn-primary block full-width m-b">注册</button>

                <p class="text-muted text-center"><small>已有账号?</small></p>
                <a class="btn btn-sm btn-white btn-block" href="/auth/login">登录</a>
            </form>
            <p class="m-t"> <small>{{config('site.sitename')}} &copy; 2015</small> </p>
        </div>
    </div>

    <!-- Mainly scripts -->
    <script src="/assets/js/jquery-2.1.1.js"></script>
    <script src="/assets/js/bootstrap.min.js"></script>
    <script>$(function(){$.ajaxSetup({headers: {'X-CSRF-TOKEN':$('meta[name="csrf-token"]').attr('content')}});})</script>

    <!-- iCheck -->
    <script src="/assets/js/plugins/iCheck/icheck.min.js"></script>
    <script src="/assets/js/plugins/validation/dist/jquery.validate.min.js"></script>
    <script>
        $(document).ready(function(){
            $('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });
            $("#form").validate({
                rules: {
                    username: {
                        required: true
                    },
                    fullname: {
                        required: true
                    },
                    phone: {
                        required: true
                    },
                    email:{
                        required:true,
                        email:true
                    },
                    gender: {
                        required: true
                    }
                },
                messages: {
                    username: "请填写用户名",
                    fullname: "请填写姓名",
                    phone: "请填写手机",
                    email: "请填写正确的Email",
                    gender: "请填写性别"
                }
            });
        });
    </script>
</body>

</html>
